package com.itheima.pinda.service.impl;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.itheima.pinda.entity.OrderClassifyOrderEntity;
import com.itheima.pinda.mapper.OrderClassifyOrderMapper;
import com.itheima.pinda.service.OrderClassifyOrderService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * @author llhuang10
 * @date 2021/10/25 21:03
 */
@Slf4j
@Service
public class OrderClassifyOrderServiceImpl extends ServiceImpl<OrderClassifyOrderMapper, OrderClassifyOrderEntity> implements OrderClassifyOrderService {


    @Override
    public String getClassifyId(String orderId) {
        OrderClassifyOrderEntity orderEntity = super.getOne(Wrappers.<OrderClassifyOrderEntity>lambdaQuery()
                .eq(OrderClassifyOrderEntity::getOrderId, orderId));
        return orderEntity.getOrderClassifyId();
    }
}
